package com.gu.mobileweb.controller;

import com.gu.mobileweb.model.IndexHot;
import com.gu.mobileweb.service.IndexHotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/home/hot")
public class IndexHotController {
    @Autowired
    private IndexHotService indexHotService;

    @GetMapping("/")
    public List<IndexHot> getAllIndexHot(){
        return indexHotService.getAllIndexHot();
    }
}
